package com.example.beandefinition.config;

import org.springframework.beans.factory.FactoryBean;

public class MyFactoryBean implements FactoryBean<SystemConfig> {
    @Override
    public boolean isSingleton() {
        return true;
    }

    @Override
    public SystemConfig getObject() throws Exception {
        return new SystemConfig("study beanDefinition");
    }

    @Override
    public Class<?> getObjectType() {
        System.out.println("--MyFactoryBean getObjectType--");
        return SystemConfig.class;
    }
}
